#ifndef _GS_ICEVIDEOCONFIG_H_
#define _GS_ICEVIDEOCONFIG_H_

/*********************
 gs_ICEVideoConfig -- 
  a gamestate that allows the user to select
  video configuration options as provided from
  the file defined in GS_CONFIG_FILE
*********************/

#include <irrlicht.h>
#include "..\Base_Classes\B_GameState.h"
#include "..\ICEFrameworkEngine.h"
#include "..\Framework_Defines.h"
#include "..\Utility\tinyXML.h"
#include "ICE_Options.h"

#define GS_CONFIG_FILE "data/settings/device_opts.xml"
#define GS_CONFIG_FILE_VER "ICE device config v1.0"

//gs_intro GUI objects ID enum
enum tGSCNF_GUIobjs {  
    GSCNF_GUI_BTN_OK = 101, //quit application
    GSCNF_GUI_LST_DEV,
    GSCNF_GUI_LST_RES,      //list of resoultions
    GSCNF_GUI_LST_COLOR,    //list of color depths
    GSCNF_GUI_CHK_FULLSCRN, //check box - fullscreen
    
    GSCNF_GUI_OBJS_NUM      // unused 
};

class gs_ICEVideoConfig : public B_GameState
{
private:
	bool newDeviceSettings;

	//not static, because this state is only seen once
	irr::gui::IGUIButton *m_btn_ok;
	irr::gui::IGUIStaticText *m_txt_title;
	irr::video::ITexture * m_pIceLogo;
	irr::gui::IGUIListBox* m_lst_dev;
	irr::gui::IGUIListBox* m_lst_res;
	irr::gui::IGUIListBox* m_lst_color;
	irr::gui::IGUICheckBox *m_chk_fullscreen;

public:
	gs_ICEVideoConfig(B_GameStateHandler* handler, bool initialConfig = false);
	~gs_ICEVideoConfig(void);

	//GAME STATE FUNCTIONS:
	void Render();                    
	bool onEvent(irr::SEvent event);  
	void Update();
};

#endif
